<template>
	<div class="notice">
		<div class="notice-block sd-flex">
			<div class="notice-image sd-flex">
				<el-image :src="STATIC_URL + datas.src" fit="cover" class="cover-image" v-if="datas.src != ''" />
			</div>
			<el-divider direction="vertical" />
			<div class="text" :style="{ color: datas.title.color }">{{ datas.title.text }}</div>
		</div>
		<!-- 删除组件 -->
		<slot name="deles" />
	</div>
</template>

<script setup name="notice">
import { STATIC_URL } from '/@/utils/config';
const props = defineProps({
	// 父组件传过来的数据
	datas: {},
});
</script>

<style scoped lang="scss">
.notice {
	position: relative;
	height: 40px;
}

.notice-block {
	height: 100%;
}

.notice-block .text {
	min-height: 14px !important;
	height: 14px;
	font-size: 14px;
	padding: 0 0 0 12px;
	overflow: hidden;
}

.notice-image {
	position: relative;
	overflow: hidden;
	flex-shrink: 0;
	height: 100%;
}
</style>
